home *** CD-ROM | disk | FTP | other *** search
- ; MORE STUFF NICKED FROM THE SUP32.LIBRARY (C) Matt Dillon
-
- xdef _gethead
- xdef _getsucc
- xdef _nextnode
- xdef _gettail
-
- OPT o+ ;optimize
- OPT l+ ;link
-
- ; input A0, output d0
- _nextnode
- _gethead
- _getsucc
- MOVEA.L (A0),A0
- TST.L (A0)
- BEQ.S _gh_nogo
- MOVE.L A0,D0
- RTS
- _gh_nogo
- MOVEQ #0,D0
- RTS
-
-
- ; a0 input, d0 output
- _gettail:
- move.l 8(A0),A1 ;A1 = lh_TailPred
- move.l A1,D0 ;D0 = result
- cmp.l A1,A0 ;is it pointing to lh_Head?
- bne.s _gt_nogo
- moveq #0,d0
- _gt_nogo
- rts
-
-
- ; Original gettail as per sup32 lib but we shall use the above one I think
- ; input: A0, output d0
- ;_gettail
- ; MOVEA.L 8(A0),A0
- ; TST.L 4(A0)
- ; BEQ.S _gt_nogo
- ; MOVE.L A0,D0
- ; RTS
- ;_gt_nogo
- ; MOVEQ #00,D0
- ; RTS
-
-
-